<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function money() {
        let idCard = +prompt("请输入银行卡余额")
        let foods = +prompt("请输入当月食宿消费金额")
        let life = +prompt("请输入当月生活消费金额")
        return idCard - foods - life
      }
      document.write(money())
    </script>
  </body>
</html>
